package com.car.mapper;

import com.car.pojo.MaintenanceAppointment;
import com.car.pojo.MaintenanceAppointmentQueryParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 保养预约Mapper接口
 */
@Mapper
public interface MaintenanceAppointmentMapper {
    /**
     * 分页查询保养预约
     */
    List<MaintenanceAppointment> page(@Param("param") MaintenanceAppointmentQueryParam param);
    
    /**
     * 查询总记录数
     */
    Long count(@Param("param") MaintenanceAppointmentQueryParam param);
    
    /**
     * 根据ID查询保养预约详情
     */
    MaintenanceAppointment getById(@Param("id") Long id);
    
    /**
     * 更新预约状态
     */
    void updateStatus(@Param("id") Long id, @Param("status") String status);
    
    /**
     * 批量删除保养预约
     */
    void deleteBatch(@Param("ids") List<Long> ids);
    
    /**
     * 查询所有保养预约（用于导出等）
     */
    List<MaintenanceAppointment> listAll(@Param("param") MaintenanceAppointmentQueryParam param);
}